<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>动画速度曲线-step</title>
    <style>
        div{
            overflow: hidden;
            font-size: 20px;
            height: 30px;
            line-height: 30px;
            /* 让文字强制在一行转换 */
            white-space: nowrap;
            background-color: pink;
            /* step() s是分几步完成动画 有了step 就不在写 linear 或者ease  forwards 是不回到原点开始*/
            animation: w 4s steps(10) forwards;
        }
        @keyframes w{
            0%{
             width: 0px;
            }
            100%{
                width: 215px;
            }
        }
    </style>
</head>
<body>
    <div>我在黑暗的尽头等你来</div>
</body>
</html>